home *** CD-ROM | disk | FTP | other *** search
/ Leonardo the Inventor / Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso / LEOWINMV / SHARED.DIR / 03104_Script_INITIALIZE-LEAVE-START < prev    next >
Text File  |  1996-04-01  |  4KB  |  120 lines

  1. -- -----------------------------------------------------------
  2. -- Handler initializeLeo2 
  3.  
  4. on initializeLeo2
  5.   global dialogSprite, initializeLeoFlag
  6.   global printCardRect, printFullScreenRect, printAllCardsRect
  7.   global copyTextCast, copyPictureCast
  8.   global pasteNowRect, cancelPasteRect
  9.   global printDialogLocH, printDialogLocV
  10.   global pasteDialogLocH, pasteDialogLocV
  11.   
  12.   -- since initialize is called in a frame that gets visited more than once,
  13.   -- only initialize if initialization hasn't been done yet.
  14.   if voidP(initializeLeoFlag) then
  15.     set dialogSprite = 39
  16.     set printDialogLocH = 350
  17.     set printDialogLocV = 200
  18.     set printCardRect = rect(312, 166, 390, 215)
  19.     set printFullScreenRect = rect(196, 166, 274, 215)
  20.     --    set printAllCardsRect = rect(428,166,506,215)
  21.     
  22.     set pasteDialogLocH = 360
  23.     set pasteDialogLocV = 240
  24.     set pasteNowRect = rect(221, 256, 316, 318)
  25.     set cancelPasteRect = rect(380, 255, 475, 317)
  26.     set initializeLeoFlag = TRUE
  27.     
  28.     set copyPictureCast = 3092
  29.     set copyTextCast = 3125
  30.     resetCategoryNarrationFlags
  31.     
  32.     setButtonCastGlobals
  33.     set the exitLock to FALSE -- Set to TRUE by ET March 20 1996,
  34.     --                          so user can't exit without clicking "Quit". But, due to bug
  35.     -- in projectors, can't set to TRUE. So, set to false.
  36.   end if
  37. end
  38.  
  39. on il2
  40.   initializeLeo2
  41. end
  42.  
  43. -- -----------------------------------------------------------
  44. -- Handler leaveLeo2 cleans up.
  45.  
  46. on leaveLeo2
  47.   pauseClick 2*60
  48.   unBlackOutScreen
  49.   quit
  50. end
  51.  
  52. -- ---------------------------------------------------------------
  53. -- Handler startMovie
  54.  
  55. on startMovie
  56.   setAuxiliarySearch
  57.   stopPlayingLoadingSound
  58. end
  59.  
  60. -- ---------------------------------------------------------------
  61. -- Handler setAuxiliarySearch sets the searchpath for auxiliary files.
  62.  
  63. on setAuxiliarySearch
  64.   set movieName = the movie
  65.   set movieNameLength = length(movieName)
  66.   -- the following is the old line, when all movies had less than 8 chars
  67.   -- in the old leonardo, some movie names had 8 chars and then the
  68.   -- media folder had 9 chars
  69.   --  set folderName = char 1 to (movieNameLength - 4) of movieName
  70.   
  71.   set folderName = char 1 to (movieNameLength - 4) of movieName
  72.   
  73.   if (length(folderName) >= 8) then set folderName = char 1 to 7 of folderName
  74.   
  75.   set folderName = folderName & "A"
  76.   set the searchPath = [the pathName & folderName]
  77. end
  78.  
  79. -- ---------------------------------------------------------------
  80. -- Handler setButtonCastGlobals sets the global variables used
  81. -- to hilite buttons.
  82.  
  83. on setButtonCastGlobals
  84.   global smallBtnNoScriptHilited
  85.   set smallBtnNoScriptHilited = the number of cast "Small Btn NO SCRIPT Hilited"
  86.   
  87.   global greyBtnHilited
  88.   set greyBtnHilited = the number of cast "Grey btn hilited"
  89.   
  90.   global smallBtnHilited
  91.   set smallBtnHilited = the number of cast "Small Btn Hilited"
  92.   
  93.   
  94.   global largeButtonHilited
  95.   set largeButtonHilited = the number of cast "Large Button Hilited"
  96.   
  97.   global mediumButtonHilite
  98.   set mediumButtonHilite = the number of cast "Medium Button Hilited"
  99.   
  100.   global replayHilited
  101.   set replayHilited = the number of cast "Replay Hilited"
  102.   
  103.   global greyPrintBtnHilited
  104.   set greyPrintBtnHilited = the number of cast "Grey Print btn hilited"
  105.   
  106.   global PrintBtnHilited
  107.   set PrintBtnHilited = the number of cast "Print Btn Hilited"
  108.   
  109.   global CopyBtnHilited
  110.   set CopyBtnHilited = the number of cast "Copy Btn Hilited"
  111.   
  112.   --  global MediumButtonHilitedNoSCRIPT
  113.   --  set MediumButtonHilitedNoSCRIPT = the number of cast "Medium Button Hilited NO SCRIPT"
  114.   
  115.   global InventBtnHilited
  116.   set InventBtnHilited = the number of cast "Invent Btn Hilited"
  117.   
  118.   global QuitBtnHilited
  119.   set QuitBtnHilited = the number of cast "Quit Btn Hilited"
  120. end